/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudr_DataRepository API OpenAPI file
 * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
 * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "SubscriptionDataSubscriptions.h"

namespace oai::udr::model {

SubscriptionDataSubscriptions::SubscriptionDataSubscriptions() {
  m_UeId = "";
  m_UeIdIsSet = false;
  m_CallbackReference = "";
  m_OriginalCallbackReference = "";
  m_OriginalCallbackReferenceIsSet = false;
  m_Expiry = "";
  m_ExpiryIsSet = false;
  m_SdmSubscriptionIsSet = false;
  m_SubscriptionId = "";
  m_SubscriptionIdIsSet = false;
  m_Supported_features = "";
  m_Supported_featuresIsSet = false;
}

SubscriptionDataSubscriptions::~SubscriptionDataSubscriptions() {}

void SubscriptionDataSubscriptions::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json &j, const SubscriptionDataSubscriptions &o) {
  j = nlohmann::json();
  if (o.ueIdIsSet())
    j["ueId"] = o.m_UeId;
  j["callbackReference"] = o.m_CallbackReference;
  if (o.originalCallbackReferenceIsSet())
    j["originalCallbackReference"] = o.m_OriginalCallbackReference;
  j["monitoredResourceUris"] = o.m_MonitoredResourceUris;
  if (o.expiryIsSet())
    j["expiry"] = o.m_Expiry;
  if (o.sdmSubscriptionIsSet())
    j["sdmSubscription"] = o.m_SdmSubscription;
  if (o.subscriptionIdIsSet())
    j["subscriptionId"] = o.m_SubscriptionId;
  if (o.supportedFeaturesIsSet())
    j["supported-features"] = o.m_Supported_features;
}

void from_json(const nlohmann::json &j, SubscriptionDataSubscriptions &o) {
  if (j.find("ueId") != j.end()) {
    j.at("ueId").get_to(o.m_UeId);
    o.m_UeIdIsSet = true;
  }
  j.at("callbackReference").get_to(o.m_CallbackReference);
  if (j.find("originalCallbackReference") != j.end()) {
    j.at("originalCallbackReference").get_to(o.m_OriginalCallbackReference);
    o.m_OriginalCallbackReferenceIsSet = true;
  }
  j.at("monitoredResourceUris").get_to(o.m_MonitoredResourceUris);
  if (j.find("expiry") != j.end()) {
    j.at("expiry").get_to(o.m_Expiry);
    o.m_ExpiryIsSet = true;
  }
  if (j.find("sdmSubscription") != j.end()) {
    j.at("sdmSubscription").get_to(o.m_SdmSubscription);
    o.m_SdmSubscriptionIsSet = true;
  }
  if (j.find("subscriptionId") != j.end()) {
    j.at("subscriptionId").get_to(o.m_SubscriptionId);
    o.m_SubscriptionIdIsSet = true;
  }
  if (j.find("supported-features") != j.end()) {
    j.at("supported-features").get_to(o.m_Supported_features);
    o.m_Supported_featuresIsSet = true;
  }
}

std::string SubscriptionDataSubscriptions::getUeId() const { return m_UeId; }
void SubscriptionDataSubscriptions::setUeId(std::string const &value) {
  m_UeId = value;
  m_UeIdIsSet = true;
}
bool SubscriptionDataSubscriptions::ueIdIsSet() const { return m_UeIdIsSet; }
void SubscriptionDataSubscriptions::unsetUeId() { m_UeIdIsSet = false; }
std::string SubscriptionDataSubscriptions::getCallbackReference() const {
  return m_CallbackReference;
}
void SubscriptionDataSubscriptions::setCallbackReference(
    std::string const &value) {
  m_CallbackReference = value;
}
std::string
SubscriptionDataSubscriptions::getOriginalCallbackReference() const {
  return m_OriginalCallbackReference;
}
void SubscriptionDataSubscriptions::setOriginalCallbackReference(
    std::string const &value) {
  m_OriginalCallbackReference = value;
  m_OriginalCallbackReferenceIsSet = true;
}
bool SubscriptionDataSubscriptions::originalCallbackReferenceIsSet() const {
  return m_OriginalCallbackReferenceIsSet;
}
void SubscriptionDataSubscriptions::unsetOriginalCallbackReference() {
  m_OriginalCallbackReferenceIsSet = false;
}
std::vector<std::string> &
SubscriptionDataSubscriptions::getMonitoredResourceUris() {
  return m_MonitoredResourceUris;
}
void SubscriptionDataSubscriptions::setMonitoredResourceUris(
    std::vector<std::string> const &value) {
  m_MonitoredResourceUris = value;
}
std::string SubscriptionDataSubscriptions::getExpiry() const {
  return m_Expiry;
}
void SubscriptionDataSubscriptions::setExpiry(std::string const &value) {
  m_Expiry = value;
  m_ExpiryIsSet = true;
}
bool SubscriptionDataSubscriptions::expiryIsSet() const {
  return m_ExpiryIsSet;
}
void SubscriptionDataSubscriptions::unsetExpiry() { m_ExpiryIsSet = false; }
SdmSubscription SubscriptionDataSubscriptions::getSdmSubscription() const {
  return m_SdmSubscription;
}
void SubscriptionDataSubscriptions::setSdmSubscription(
    SdmSubscription const &value) {
  m_SdmSubscription = value;
  m_SdmSubscriptionIsSet = true;
}
bool SubscriptionDataSubscriptions::sdmSubscriptionIsSet() const {
  return m_SdmSubscriptionIsSet;
}
void SubscriptionDataSubscriptions::unsetSdmSubscription() {
  m_SdmSubscriptionIsSet = false;
}
std::string SubscriptionDataSubscriptions::getSubscriptionId() const {
  return m_SubscriptionId;
}
void SubscriptionDataSubscriptions::setSubscriptionId(
    std::string const &value) {
  m_SubscriptionId = value;
  m_SubscriptionIdIsSet = true;
}
bool SubscriptionDataSubscriptions::subscriptionIdIsSet() const {
  return m_SubscriptionIdIsSet;
}
void SubscriptionDataSubscriptions::unsetSubscriptionId() {
  m_SubscriptionIdIsSet = false;
}
std::string SubscriptionDataSubscriptions::getSupportedFeatures() const {
  return m_Supported_features;
}
void SubscriptionDataSubscriptions::setSupportedFeatures(
    std::string const &value) {
  m_Supported_features = value;
  m_Supported_featuresIsSet = true;
}
bool SubscriptionDataSubscriptions::supportedFeaturesIsSet() const {
  return m_Supported_featuresIsSet;
}
void SubscriptionDataSubscriptions::unsetSupported_features() {
  m_Supported_featuresIsSet = false;
}

} // namespace oai::udr::model
